package org.example.maibobo.decode;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.smartboot.socket.transport.AioSession;

import java.io.IOException;

public class InvokeFunc {

    private static final Logger LOGGER = LoggerFactory.getLogger(InvokeFunc.class);

    /**
     * 设备初次链接
     *
     * @param session
     * @param data
     * @throws IOException
     */
    public static void authentication(AioSession session, byte[] data) throws IOException {
        new AuthenticationDecode().decoder(session, data);
    }

    /**
     * 当次测量结果
     *
     * @param session
     * @param data
     * @throws IOException
     */
    public static void currentMeasurementData(AioSession session, byte[] data) throws IOException {
        new CurrentMeasurementDataDecode().decoder(session, data);
    }

    public static void earlyMemoryData(AioSession session, byte[] data) throws IOException {
        new EarlyMemoryDataDecode().decoder(session, data);
    }
}
